const webpack = require('webpack');
const path = require('path');
const rules = require('./webpack.rules');

rules.push(
  {
    test: /\.css$/,
    use: [{ loader: 'style-loader' }, { loader: 'css-loader' }]
  },
  {
    test: /\.less$/,
    use: [{ loader: 'style-loader' }, { loader: 'css-loader' }, { loader: 'less-loader' }]
  }
);

module.exports = {
  // Put your normal webpack config below here
  module: {
    rules
  },
  plugins: [new webpack.ProvidePlugin({ React: 'react' })],
  resolve: {
    extensions: ['.js', '.json', '.jsx'],
    alias: {
      '@': path.join(__dirname, './src/web')
    }
  }
};
